package com.xiyucode.yuerinterface.controller;

import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.crypto.SecureUtil;
import com.xiyucode.yuerclientsdk.model.User;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;

import static com.xiyucode.yuerinterface.constant.ConstantUtil.NUMBER_LENGTH;
import static com.xiyucode.yuerinterface.constant.ConstantUtil.NUMBER_SIZE;

/**
 * 数学工具类Controoler
 *
 * @Author xiyucode
 */
@RestController
@RequestMapping("/utils")
public class NumberController {

    @GetMapping("/randomIntegerList")
    public String getRandomNumberGet(int begin, int end, int size) {
        String string = Arrays.toString(NumberUtil.generateBySet(begin, end + NUMBER_SIZE, size));
        System.out.println(string);
        return "随机数获取到的数字" + string;
    }


}